

#ifndef __SHAREDSHADERBINDING_H__
#define __SHAREDSHADERBINDING_H__

#include <export.h>
#include <iobject.h>
#include <gfx/programparametername.h>
#include <vector>

#include <gfx/enum.h>

class ceSharedValueManager;
struct iProgram;
struct iSharedValue;

/**
 * \addtogroup graphics
 * @{
 */

/**
 * @brief Shared variable within the engine that get's passed into the shading system
 */
class CE_API ceSharedShaderBinding : public iObject
{
  CE_OBJECT
private:
	struct SharedBinding 
	{
		std::string								SharedName;
		int												SharedIndex;
		iSharedValue*							Value;
		ceProgramParameterName		Binding;
	};
	std::vector<SharedBinding>	_bindings;

public:
  ceSharedShaderBinding ();
  virtual ~ceSharedShaderBinding ();

	void Add (const std::string& name, const ceProgramParameterName& parameter);

	void Bind (ceSharedValueManager* manager, iProgram* program);
};

/** @} */

#endif /* ! __SHAREDSHADERBINDING_H__ */
